import 'core-js/stable'
import 'regenerator-runtime/runtime'

import { sum, square } from './js/utils.js'
const getInfo = require('./js/api.js')
import '@/js/image'
import '@/js/font'
import '@/js/login'
import '@/js/title'
import '@/js/hmr'
import a from './test/test1'

console.log(a)
import { Validate } from './js/miniprogram'

let validate = new Validate("sign");
console.log(validate);

import './css/login.css'

import Vue from 'vue'
// import App from './App.vue'

import axios from 'axios'

import( /*webpackChunkName:"main1"*/ './main1')  //魔法注释 来为chunk name的命名

console.log('测试摇树优化')
console.log(sum(10, 20))
console.log(sum)
console.log(square)
console.log(square(10))


const p1 = new Promise((resolve, reject) => {
  console.log('hi 77')
})

console.log(p1)
console.log(`当前env环境 -> ${process.env.NODE_ENV}`)

const url = '/api/users'
axios.get(url).then(res => {
  console.log(`请求： ${url}, 成功`)
  console.log(res.data)
})

//判断模块热更新
if (module.hot) {
  module.hot.accept(['./js/title.js'], () => {
    console.log('title.js更新啦...')
  })
}


// new Vue({
//   render: h => h(App)
// }).$mount('#app')